<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>社交问答推荐展示</title>
    
    <!-- 引入所需的CDN文件 -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <style>
        :root {
            --primary: #3b82f6;
            --primary-light: #eff6ff;
            --secondary: #64748b;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --light: #f1f5f9;
            --dark: #1e293b;
            --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
            --shadow: 0 4px 10px rgba(0,0,0,0.08);
            --transition: all 0.3s ease;
        }
        
        body {
            background-color: #f8fafc;
            color: var(--dark);
        }
        
        .qa-card {
            transition: var(--transition);
            height: 100%;
            border: 1px solid #e2e8f0;
        }
        
        .qa-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow);
            border-color: transparent;
        }
        
        .question-tag {
            font-size: 0.75rem;
            padding: 0.25rem 0.75rem;
            border-radius: 999px;
            background-color: var(--primary-light);
            color: var(--primary);
            font-weight: 500;
        }
        
        .question-status {
            font-size: 0.8rem;
            padding: 0.25rem 0.75rem;
            border-radius: 999px;
        }
        
        .status-resolved {
            background-color: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }
        
        .status-unresolved {
            background-color: rgba(245, 158, 11, 0.1);
            color: var(--warning);
        }
        
        .status-urgent {
            background-color: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--primary-light);
            color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }
        
        .stats-item {
            font-size: 0.85rem;
            color: var(--secondary);
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .stats-item i {
            font-size: 0.9rem;
        }
        
        .answer-preview {
            border-left: 3px solid var(--primary-light);
            padding-left: 1rem;
            margin-top: 0.75rem;
            font-size: 0.9rem;
        }
        
        .layout-tabs .nav-link {
            color: var(--secondary);
            border: none;
            border-bottom: 2px solid transparent;
            border-radius: 0;
            padding: 0.5rem 1rem;
            font-weight: 500;
        }
        
        .layout-tabs .nav-link.active {
            color: var(--primary);
            border-bottom: 2px solid var(--primary);
            background: transparent;
        }
        
        .layout-tabs .nav-link:hover:not(.active) {
            color: var(--primary);
            border-bottom: 2px solid var(--primary-light);
        }
        
        /* 列表布局样式 */
        .list-layout .qa-card {
            display: flex;
            flex-direction: row;
            height: auto;
        }
        
        @media (max-width: 768px) {
            .list-layout .qa-card {
                flex-direction: column;
            }
        }
        
        .list-layout .qa-stats {
            flex: 0 0 100px;
            border-right: 1px solid #e2e8f0;
        }
        
        .list-layout .qa-content {
            flex: 1;
        }
        
        /* 紧凑布局样式 */
        .compact-layout .qa-card {
            padding: 1rem;
        }
        
        .compact-layout .question-title {
            font-size: 1rem;
            margin-bottom: 0.5rem;
        }
    </style>
</head>
<body>
    <div class="container mt-5 mb-10">
        <div class="mb-6">
            <h2 class="text-primary fw-bold mb-4">推荐问答</h2>
            
            <!-- 布局切换选项卡 -->
            <ul class="nav layout-tabs mb-6" id="layoutTabs" role="tablist">
                <li class="nav-item" role="presentation">
                    <button class="nav-link active" id="card-layout-tab" data-bs-toggle="tab" 
                            data-bs-target="#card-layout" type="button" role="tab" 
                            aria-controls="card-layout" aria-selected="true">
                        <i class="fas fa-th-large me-2"></i>卡片布局
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="list-layout-tab" data-bs-toggle="tab" 
                            data-bs-target="#list-layout" type="button" role="tab" 
                            aria-controls="list-layout" aria-selected="false">
                        <i class="fas fa-list me-2"></i>列表布局
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="compact-layout-tab" data-bs-toggle="tab" 
                            data-bs-target="#compact-layout" type="button" role="tab" 
                            aria-controls="compact-layout" aria-selected="false">
                        <i class="fas fa-align-left me-2"></i>紧凑布局
                    </button>
                </li>
            </ul>
            
            <!-- 布局内容区域 -->
            <div class="tab-content" id="layoutTabsContent">
                <!-- 卡片布局 -->
                <div class="tab-pane fade show active" id="card-layout" role="tabpanel" aria-labelledby="card-layout-tab">
                    <div class="row g-4">
                        <!-- 带图片的问题 -->
                        <div class="col-md-6 col-lg-4 d-flex">
                            <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden w-100">
                                <div class="relative h-40 overflow-hidden">
                                    <img src="https://picsum.photos/600/400?random=20" alt="编程问题相关代码截图" class="w-full h-full object-cover">
                                    <span class="question-tag absolute top-3 left-3">编程</span>
                                </div>
                                
                                <div class="p-5">
                                    <div class="d-flex justify-content-between items-start mb-3">
                                        <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-0">
                                            <a href="#" class="text-dark text-decoration-none">如何解决React中的状态更新延迟问题？</a>
                                        </h3>
                                        <span class="question-status status-unresolved">未解决</span>
                                    </div>
                                    
                                    <p class="text-secondary text-sm mb-4 line-clamp-2">
                                        我在使用setState更新状态后立即访问状态，发现获取的还是旧值，这是什么原因导致的？
                                    </p>
                                    
                                    <div class="d-flex items-center justify-between">
                                        <div class="d-flex items-center gap-2">
                                            <div class="user-avatar">
                                                <i class="fas fa-user"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium">前端开发者</div>
                                                <div class="text-xs text-secondary">2小时前</div>
                                            </div>
                                        </div>
                                        
                                        <div class="d-flex items-center gap-3">
                                            <span class="stats-item"><i class="far fa-comment"></i> 8</span>
                                            <span class="stats-item"><i class="far fa-eye"></i> 324</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 带最佳答案的问题 -->
                        <div class="col-md-6 col-lg-4 d-flex">
                            <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden w-100">
                                <div class="p-5">
                                    <div class="d-flex flex-wrap gap-2 mb-3">
                                        <span class="question-tag">美食</span>
                                        <span class="question-status status-resolved">已解决</span>
                                    </div>
                                    
                                    <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-3">
                                        <a href="#" class="text-dark text-decoration-none">如何做出完美的戚风蛋糕？总是塌陷怎么办？</a>
                                    </h3>
                                    
                                    <p class="text-secondary text-sm mb-3 line-clamp-2">
                                        尝试了很多次，戚风蛋糕总是在烘焙后期塌陷，而且内部组织不够蓬松，问题可能出在哪里？
                                    </p>
                                    
                                    <div class="answer-preview text-secondary">
                                        <div class="font-medium text-primary mb-1">最佳答案：</div>
                                        <p class="line-clamp-2">塌陷通常有几个原因：蛋白霜打发不足、烘烤时间不够、出炉后没有及时倒扣...</p>
                                    </div>
                                    
                                    <div class="d-flex items-center justify-between mt-4">
                                        <div class="d-flex items-center gap-2">
                                            <div class="user-avatar">
                                                <i class="fas fa-bake-bread"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium">烘焙爱好者</div>
                                                <div class="text-xs text-secondary">昨天</div>
                                            </div>
                                        </div>
                                        
                                        <div class="d-flex items-center gap-3">
                                            <span class="stats-item"><i class="far fa-comment"></i> 15</span>
                                            <span class="stats-item"><i class="far fa-eye"></i> 756</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 紧急问题 -->
                        <div class="col-md-6 col-lg-4 d-flex">
                            <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden w-100">
                                <div class="p-5">
                                    <div class="d-flex flex-wrap gap-2 mb-3">
                                        <span class="question-tag">旅行</span>
                                        <span class="question-status status-urgent">紧急</span>
                                    </div>
                                    
                                    <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-3">
                                        <a href="#" class="text-dark text-decoration-none">护照丢失，在国外如何紧急补办？</a>
                                    </h3>
                                    
                                    <p class="text-secondary text-sm mb-4 line-clamp-3">
                                        我现在在日本旅行，护照不小心丢失了，明天就要转机回国，这种情况应该怎么办？需要哪些材料？
                                    </p>
                                    
                                    <div class="d-flex items-center justify-between">
                                        <div class="d-flex items-center gap-2">
                                            <div class="user-avatar">
                                                <i class="fas fa-plane"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium">环球旅行者</div>
                                                <div class="text-xs text-secondary">1小时前</div>
                                            </div>
                                        </div>
                                        
                                        <div class="d-flex items-center gap-3">
                                            <span class="stats-item"><i class="far fa-comment"></i> 23</span>
                                            <span class="stats-item"><i class="far fa-eye"></i> 982</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 多标签问题 -->
                        <div class="col-md-6 col-lg-4 d-flex">
                            <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden w-100">
                                <div class="grid grid-cols-2 gap-1 h-40">
                                    <img src="https://picsum.photos/300/400?random=21" alt="笔记本电脑" class="w-full h-full object-cover">
                                    <img src="https://picsum.photos/300/400?random=22" alt="编程工作" class="w-full h-full object-cover">
                                </div>
                                
                                <div class="p-5">
                                    <div class="d-flex flex-wrap gap-2 mb-3">
                                        <span class="question-tag">数码</span>
                                        <span class="question-tag">推荐</span>
                                        <span class="question-status status-unresolved">未解决</span>
                                    </div>
                                    
                                    <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-3">
                                        <a href="#" class="text-dark text-decoration-none">预算1万左右，适合编程的笔记本电脑推荐？</a>
                                    </h3>
                                    
                                    <p class="text-secondary text-sm mb-4 line-clamp-2">
                                        主要用于前端开发，偶尔需要运行虚拟机，希望续航好一点，轻便易携带，有什么推荐吗？
                                    </p>
                                    
                                    <div class="d-flex items-center justify-between">
                                        <div class="d-flex items-center gap-2">
                                            <div class="user-avatar">
                                                <i class="fas fa-laptop"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium">程序员小明</div>
                                                <div class="text-xs text-secondary">3天前</div>
                                            </div>
                                        </div>
                                        
                                        <div class="d-flex items-center gap-3">
                                            <span class="stats-item"><i class="far fa-comment"></i> 31</span>
                                            <span class="stats-item"><i class="far fa-eye"></i> 1254</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 带投票的问题 -->
                        <div class="col-md-6 col-lg-4 d-flex">
                            <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden w-100">
                                <div class="p-5">
                                    <div class="d-flex flex-wrap gap-2 mb-3">
                                        <span class="question-tag">职场</span>
                                        <span class="question-status status-unresolved">讨论中</span>
                                    </div>
                                    
                                    <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-3">
                                        <a href="#" class="text-dark text-decoration-none">工作中遇到推卸责任的同事该怎么办？</a>
                                    </h3>
                                    
                                    <p class="text-secondary text-sm mb-4 line-clamp-2">
                                        团队项目中总有同事把自己的工作推给别人，出了问题还推卸责任，该如何处理这种情况？
                                    </p>
                                    
                                    <div class="d-flex items-center justify-between">
                                        <div class="d-flex items-center gap-2">
                                            <div class="user-avatar">
                                                <i class="fas fa-briefcase"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium">职场新人</div>
                                                <div class="text-xs text-secondary">1周前</div>
                                            </div>
                                        </div>
                                        
                                        <div class="d-flex items-center gap-3">
                                            <span class="stats-item"><i class="far fa-comment"></i> 47</span>
                                            <span class="stats-item"><i class="fas fa-vote-yea"></i> 128</span>
                                            <span class="stats-item"><i class="far fa-eye"></i> 2156</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 带代码块的问题 -->
                        <div class="col-md-6 col-lg-4 d-flex">
                            <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden w-100">
                                <div class="p-5">
                                    <div class="d-flex flex-wrap gap-2 mb-3">
                                        <span class="question-tag">Python</span>
                                        <span class="question-status status-resolved">已解决</span>
                                    </div>
                                    
                                    <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-3">
                                        <a href="#" class="text-dark text-decoration-none">Python读取大文件时内存溢出如何解决？</a>
                                    </h3>
                                    
                                    <p class="text-secondary text-sm mb-3">
                                        我用以下代码读取一个5GB的CSV文件时总是内存溢出，有什么优化方法吗？
                                    </p>
                                    
                                    <div class="bg-light p-3 rounded text-xs font-mono mb-4 overflow-x-auto">
                                        <code>
import pandas as pd<br>
df = pd.read_csv('large_file.csv')<br>
print(df.shape)
                                        </code>
                                    </div>
                                    
                                    <div class="d-flex items-center justify-between">
                                        <div class="d-flex items-center gap-2">
                                            <div class="user-avatar">
                                                <i class="fas fa-code"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium">数据分析师</div>
                                                <div class="text-xs text-secondary">2周前</div>
                                            </div>
                                        </div>
                                        
                                        <div class="d-flex items-center gap-3">
                                            <span class="stats-item"><i class="far fa-comment"></i> 19</span>
                                            <span class="stats-item"><i class="far fa-eye"></i> 876</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 列表布局 -->
                <div class="tab-pane fade" id="list-layout" role="tabpanel" aria-labelledby="list-layout-tab">
                    <div class="list-layout space-y-4">
                        <!-- 列表项1 -->
                        <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden">
                            <div class="qa-stats p-4 d-flex flex-column items-center justify-center gap-3">
                                <div class="stats-item flex flex-column">
                                    <i class="far fa-comment text-primary"></i>
                                    <span>8</span>
                                </div>
                                <div class="stats-item flex flex-column">
                                    <i class="far fa-eye text-secondary"></i>
                                    <span>324</span>
                                </div>
                                <span class="question-status status-unresolved">未解决</span>
                            </div>
                            <div class="qa-content p-4">
                                <div class="d-flex flex-wrap gap-2 mb-2">
                                    <span class="question-tag">编程</span>
                                </div>
                                
                                <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-2">
                                    <a href="#" class="text-dark text-decoration-none">如何解决React中的状态更新延迟问题？</a>
                                </h3>
                                
                                <p class="text-secondary text-sm mb-3">
                                    我在使用setState更新状态后立即访问状态，发现获取的还是旧值，这是什么原因导致的？
                                </p>
                                
                                <div class="d-flex items-center justify-between">
                                    <div class="d-flex items-center gap-2">
                                        <div class="user-avatar">
                                            <i class="fas fa-user"></i>
                                        </div>
                                        <div>
                                            <div class="text-sm font-medium">前端开发者</div>
                                            <div class="text-xs text-secondary">2小时前</div>
                                        </div>
                                    </div>
                                    
                                    <button class="btn btn-sm btn-outline-primary">查看详情</button>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 列表项2 -->
                        <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden">
                            <div class="qa-stats p-4 d-flex flex-column items-center justify-center gap-3">
                                <div class="stats-item flex flex-column">
                                    <i class="far fa-comment text-primary"></i>
                                    <span>15</span>
                                </div>
                                <div class="stats-item flex flex-column">
                                    <i class="far fa-eye text-secondary"></i>
                                    <span>756</span>
                                </div>
                                <span class="question-status status-resolved">已解决</span>
                            </div>
                            <div class="qa-content p-4">
                                <div class="d-flex flex-wrap gap-2 mb-2">
                                    <span class="question-tag">美食</span>
                                </div>
                                
                                <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-2">
                                    <a href="#" class="text-dark text-decoration-none">如何做出完美的戚风蛋糕？总是塌陷怎么办？</a>
                                </h3>
                                
                                <p class="text-secondary text-sm mb-3">
                                    尝试了很多次，戚风蛋糕总是在烘焙后期塌陷，而且内部组织不够蓬松，问题可能出在哪里？
                                </p>
                                
                                <div class="answer-preview text-secondary">
                                    <div class="font-medium text-primary mb-1">最佳答案：</div>
                                    <p class="line-clamp-1">塌陷通常有几个原因：蛋白霜打发不足、烘烤时间不够、出炉后没有及时倒扣...</p>
                                </div>
                                
                                <div class="d-flex items-center justify-between mt-3">
                                    <div class="d-flex items-center gap-2">
                                        <div class="user-avatar">
                                            <i class="fas fa-bake-bread"></i>
                                        </div>
                                        <div>
                                            <div class="text-sm font-medium">烘焙爱好者</div>
                                            <div class="text-xs text-secondary">昨天</div>
                                        </div>
                                    </div>
                                    
                                    <button class="btn btn-sm btn-outline-primary">查看详情</button>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 列表项3 -->
                        <div class="qa-card bg-white rounded-xl shadow-sm overflow-hidden">
                            <div class="qa-stats p-4 d-flex flex-column items-center justify-center gap-3">
                                <div class="stats-item flex flex-column">
                                    <i class="far fa-comment text-primary"></i>
                                    <span>23</span>
                                </div>
                                <div class="stats-item flex flex-column">
                                    <i class="far fa-eye text-secondary"></i>
                                    <span>982</span>
                                </div>
                                <span class="question-status status-urgent">紧急</span>
                            </div>
                            <div class="qa-content p-4">
                                <div class="d-flex flex-wrap gap-2 mb-2">
                                    <span class="question-tag">旅行</span>
                                </div>
                                
                                <h3 class="question-title fs-lg fw-semibold hover:text-primary transition-colors mb-2">
                                    <a href="#" class="text-dark text-decoration-none">护照丢失，在国外如何紧急补办？</a>
                                </h3>
                                
                                <p class="text-secondary text-sm mb-3">
                                    我现在在日本旅行，护照不小心丢失了，明天就要转机回国，这种情况应该怎么办？需要哪些材料？
                                </p>
                                
                                <div class="d-flex items-center justify-between">
                                    <div class="d-flex items-center gap-2">
                                        <div class="user-avatar">
                                            <i class="fas fa-plane"></i>
                                        </div>
                                        <div>
                                            <div class="text-sm font-medium">环球旅行者</div>
                                            <div class="text-xs text-secondary">1小时前</div>
                                        </div>
                                    </div>
                                    
                                    <button class="btn btn-sm btn-primary">紧急回答</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 紧凑布局 -->
                <div class="tab-pane fade" id="compact-layout" role="tabpanel" aria-labelledby="compact-layout-tab">
                    <div class="compact-layout space-y-3">
                        <!-- 紧凑项1 -->
                        <div class="qa-card bg-white rounded-xl shadow-sm">
                            <div class="d-flex flex-wrap justify-between gap-2">
                                <div class="flex-1 min-w-0">
                                    <h3 class="question-title fw-semibold hover:text-primary transition-colors">
                                        <a href="#" class="text-dark text-decoration-none">如何解决React中的状态更新延迟问题？</a>
                                    </h3>
                                    <div class="d-flex flex-wrap items-center gap-2 mt-1 text-sm">
                                        <span class="question-tag">编程</span>
                                        <span class="text-secondary">前端开发者</span>
                                        <span class="text-secondary">2小时前</span>
                                        <span class="question-status status-unresolved">未解决</span>
                                    </div>
                                </div>
                                <div class="d-flex items-center gap-3 ml-3">
                                    <span class="stats-item"><i class="far fa-comment"></i> 8</span>
                                    <span class="stats-item"><i class="far fa-eye"></i> 324</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 紧凑项2 -->
                        <div class="qa-card bg-white rounded-xl shadow-sm">
                            <div class="d-flex flex-wrap justify-between gap-2">
                                <div class="flex-1 min-w-0">
                                    <h3 class="question-title fw-semibold hover:text-primary transition-colors">
                                        <a href="#" class="text-dark text-decoration-none">如何做出完美的戚风蛋糕？总是塌陷怎么办？</a>
                                    </h3>
                                    <div class="d-flex flex-wrap items-center gap-2 mt-1 text-sm">
                                        <span class="question-tag">美食</span>
                                        <span class="text-secondary">烘焙爱好者</span>
                                        <span class="text-secondary">昨天</span>
                                        <span class="question-status status-resolved">已解决</span>
                                    </div>
                                </div>
                                <div class="d-flex items-center gap-3 ml-3">
                                    <span class="stats-item"><i class="far fa-comment"></i> 15</span>
                                    <span class="stats-item"><i class="far fa-eye"></i> 756</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 紧凑项3 -->
                        <div class="qa-card bg-white rounded-xl shadow-sm">
                            <div class="d-flex flex-wrap justify-between gap-2">
                                <div class="flex-1 min-w-0">
                                    <h3 class="question-title fw-semibold hover:text-primary transition-colors">
                                        <a href="#" class="text-dark text-decoration-none">护照丢失，在国外如何紧急补办？</a>
                                    </h3>
                                    <div class="d-flex flex-wrap items-center gap-2 mt-1 text-sm">
                                        <span class="question-tag">旅行</span>
                                        <span class="text-secondary">环球旅行者</span>
                                        <span class="text-secondary">1小时前</span>
                                        <span class="question-status status-urgent">紧急</span>
                                    </div>
                                </div>
                                <div class="d-flex items-center gap-3 ml-3">
                                    <span class="stats-item"><i class="far fa-comment"></i> 23</span>
                                    <span class="stats-item"><i class="far fa-eye"></i> 982</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 紧凑项4 -->
                        <div class="qa-card bg-white rounded-xl shadow-sm">
                            <div class="d-flex flex-wrap justify-between gap-2">
                                <div class="flex-1 min-w-0">
                                    <h3 class="question-title fw-semibold hover:text-primary transition-colors">
                                        <a href="#" class="text-dark text-decoration-none">预算1万左右，适合编程的笔记本电脑推荐？</a>
                                    </h3>
                                    <div class="d-flex flex-wrap items-center gap-2 mt-1 text-sm">
                                        <span class="question-tag">数码</span>
                                        <span class="question-tag">推荐</span>
                                        <span class="text-secondary">程序员小明</span>
                                        <span class="text-secondary">3天前</span>
                                        <span class="question-status status-unresolved">未解决</span>
                                    </div>
                                </div>
                                <div class="d-flex items-center gap-3 ml-3">
                                    <span class="stats-item"><i class="far fa-comment"></i> 31</span>
                                    <span class="stats-item"><i class="far fa-eye"></i> 1254</span>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 紧凑项5 -->
                        <div class="qa-card bg-white rounded-xl shadow-sm">
                            <div class="d-flex flex-wrap justify-between gap-2">
                                <div class="flex-1 min-w-0">
                                    <h3 class="question-title fw-semibold hover:text-primary transition-colors">
                                        <a href="#" class="text-dark text-decoration-none">工作中遇到推卸责任的同事该怎么办？</a>
                                    </h3>
                                    <div class="d-flex flex-wrap items-center gap-2 mt-1 text-sm">
                                        <span class="question-tag">职场</span>
                                        <span class="text-secondary">职场新人</span>
                                        <span class="text-secondary">1周前</span>
                                        <span class="question-status status-unresolved">讨论中</span>
                                    </div>
                                </div>
                                <div class="d-flex items-center gap-3 ml-3">
                                    <span class="stats-item"><i class="far fa-comment"></i> 47</span>
                                    <span class="stats-item"><i class="fas fa-vote-yea"></i> 128</span>
                                    <span class="stats-item"><i class="far fa-eye"></i> 2156</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 加载更多按钮 -->
            <div class="text-center mt-8">
                <button class="btn btn-outline-primary px-6 py-2 rounded-full hover:bg-primary hover:text-white transition-all">
                    加载更多问答 <i class="fas fa-refresh ms-2"></i>
                </button>
            </div>
        </div>
    </div>

    <script>
        // 初始化布局切换
        const layoutTabs = new bootstrap.Tab('#layoutTabs');
        
        // 为问答卡片添加点击事件
        document.querySelectorAll('.qa-card').forEach(card => {
            card.addEventListener('click', function(e) {
                // 如果点击的是按钮或链接，不触发卡片点击事件
                if (e.target.closest('button, a')) return;
                
                // 获取问答链接
                const qaLink = this.querySelector('h3 a')?.getAttribute('href');
                if (qaLink && qaLink !== '#') {
                    window.location.href = qaLink;
                } else {
                    alert('查看问答详情');
                }
            });
        });
        
        // 加载更多按钮点击事件
        document.querySelector('.btn-outline-primary').addEventListener('click', function() {
            this.innerHTML = '<i class="fas fa-spinner fa-spin me-2"></i> 加载中...';
            
            // 模拟加载延迟
            setTimeout(() => {
                this.innerHTML = '加载更多问答 <i class="fas fa-refresh ms-2"></i>';
                alert('已加载全部问答');
            }, 1500);
        });
    </script>
</body>
</html>
    
